.. _`Large Language Model API`: .. _`org.sysess.sympathy.machinelearning.llm`: Large Language Model API ```````````````````````` .. image:: neural_net_brain.svg :width: 48 Connect to a Large Language Model API using an API key Documentation ::::::::::::: This node is used to connect your flow with a Large Language Model (LLM) API. Different API's can be used according to preference and availability. The prompt is entered in the node's configuration and the response from the LLM is provided on the output port. Additional data can also be provided on the :ref:`optional input port`. API key ======= Your have to provide your own API key use this node. Read more about how to obtain API keys on the services' websites: * OpenAI: https://platform.openai.com/docs/overview * Anthropic: https://docs.anthropic.com/en/home .. caution:: As with any other secrets, storing the API key directly in the node configuration is discouraged. Instead use :ref:`credentials` to store the key securely. Definition :::::::::: Input ports =========== **data** 0 - inf, text Optional data sent to the API. Output ports ============ **response** 1 - 1, text Recieved response from the API Configuration ============= **Prompt** (prompt) Enter prompt to be sent to the API **Answer Style** (prompt_mode) Sets the LLMs answer tone to abide rules for output. Use strict for cleaner data output. **Key** (secret) Your API key from the API service you have chosen Can use the credential system for storing credentials outside of the node's configuration. For more information, see the Credentials section of the documentation. **Service** (service) Select the LLM API service you want to use. You need to provide your own API key. Implementation ============== .. automodule:: node_llm :noindex: .. class:: Llm :noindex: